package com.eurobcoin.balance;

import java.io.Serializable;
import java.util.Locale;

import com.eurobcoin.helper.NumberHelper;

public class UserBalanceModel implements Serializable {

	private static final long serialVersionUID = -5363572351029251928L;

	private String currencyCode;
	
	private int currencyId;
	
	private long balance;
	
	private int decimals;
	
	private Locale locale;
	
	public String getBalanceFormatted() {
		return NumberHelper.longToDoubledString(this.balance, this.decimals, this.locale);
	}
	
	public double getBalanceAsDouble() {
		return NumberHelper.longToDouble(this.balance, this.decimals);
	}
	
	public Locale getLocale() {
		return locale;
	}

	public void setLocale(Locale locale) {
		this.locale = locale;
	}

	public int getDecimals() {
		return decimals;
	}

	public void setDecimals(int decimals) {
		this.decimals = decimals;
	}

	public String getCurrencyCode() {
		return currencyCode;
	}

	public void setCurrencyCode(String currencyCode) {
		this.currencyCode = currencyCode;
	}

	public int getCurrencyId() {
		return currencyId;
	}

	public void setCurrencyId(int currencyId) {
		this.currencyId = currencyId;
	}

	public long getBalance() {
		return balance;
	}

	public void setBalance(long balance) {
		this.balance = balance;
	}

}
